#coding=utf-8
"""
Author:杭州多测师_付佳美
Time:2025/5/9 14:27
website:https://duoceshi.net
"""
# import requests
# r = requests.post(url=url,data=data,json=json)
# r = requests.request("post",url=url,data=data,json=json)
# r = requests.sessions()

# import requests
#
# url = "http://192.168.152.128:8080/cms/manage/loginJump.do"
#
datas = {"userAccount":"admin",
         "loginPwd":"123456"}
#
# headers = {"content-type":"application/x-www-form-urlencoded"}
#
# response = requests.post(url=url,data=datas,headers=headers)
#
# result = response.json()
# print(result)
# print(type(result))
#
# result1 = response.text
# print(result1)
# print(type(result1))
#
# cookie = response.cookies
# print(cookie)
#
# status = response.status_code
# print(status)
#
# response_headers = response.headers
# print(response_headers)


# 方式2
# import requests
#
# session = requests.session()
#
# url = "http://192.168.152.128:8080/cms/manage/loginJump.do"
#
# datas = {"userAccount":'admin',
#          "loginPwd":"123456"}
#
# headers = {"content-type":"application/x-www-form-urlencoded"}
#
# response = session.post(url=url,data=datas,headers=headers)
#
# result = response.json()
# print(result)
#
# search_url = "http://192.168.152.128:8080/cms/manage/queryUserList.do"
datas1 = {"startCreateDate":"",
          "endCreateDate":"",
          "searchValue":"",
          "page":"1"}
#
#
# response1 = session.post(url=search_url,data=datas1,headers=headers)
# result1 = response1.json()
# print(result1)

# 关联接口一：上一个接口的返回值作为下一个接口的入参
# import requests
# import re
#
# class Get_Provice():
#     def get_provice(self):
#         url = "http://www.webxml.com.cn/WebServices/WeatherWebService.asmx/getSupportProvince"
#         response = requests.get(url=url)
#         result = response.text
#         all = re.findall("<string>(.+)</string>",result)
#         return all
#     def get_city(self,index):
#
#         url = "http://www.webxml.com.cn/WebServices/WeatherWebService.asmx/getSupportCity"
#         data = {"byProvinceName":self.get_provice()[index]}
#         response = requests.get(url=url,params=data)
#         print(response.text)
# if __name__ == '__main__':
#     g = Get_Provice()
#     g.get_city(5)

# 关联接口二
# import requests
# import re
# import json
#
# class Yshoop():
#     def code_uuid(self):
#         url = "http://shop.duoceshi.com/apis/auth/code"
#         response = requests.get(url=url)
#         result = response.text
#         uuid = re.findall('"uuid":"(.+)",',result)
#         uuid = uuid[0]
#         return uuid
#
#     def yshoop_login(self):
#
#         url = "http://shop.duoceshi.com/apis/auth/login"
#         datas = {"username": "admin",
#                  "password": "uNrWI7Gi/MfbAlcqPoAH1GQF2n8djN8PiX7ZxOd/PxktmrFy1DBLZOjLNO7lbfzGtPfys5n1SGMuJ1WeuVDdQw==",
#                  "code": "8888",
#                  "uuid": self.code_uuid()
#                 }
#         headers = {"content-type":"application/json"}
#         response = requests.post(url=url,data=json.dumps(datas),headers=headers)
#         result = response.json()
#         token = result["token"]
#         return token
#
#     def search_sp(self):
#         url = "http://shop.duoceshi.com/apis/api/yxStoreCategory?page=0&size=10&sort=sort%2Cdesc"
#         headers = {"authorization":self.yshoop_login()}
#         response = requests.get(url=url,headers=headers)
#         result = response.json()
#         print(result)
#
# if __name__ == '__main__':
#     y = Yshoop()
#
#     y.search_sp()
















































































